package com.wlyuan.open.dto.api.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.RequiredArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author lijing
 * @description
 */
@Data
@RequiredArgsConstructor
public class OpenApiGoodsCreationDTO implements Serializable {

    private static final long serialVersionUID = -4423531442802645399L;
    @ApiModelProperty(value = "物料编码")
    private String code;

    @NotEmpty(message = "物品名称不能为空")
    @ApiModelProperty(value = "物品名称", required = true)
    private String name;

    @NotEmpty(message = "物品规格不能为空")
    @ApiModelProperty(value = "物品规格", required = true)
    private String spec;

    @NotNull(message = "单价不能为空")
    @ApiModelProperty(value = "单价", required = true)
    private BigDecimal price;

    @NotNull(message = "物品数量不能为空")
    @ApiModelProperty(value = "物品数量", required = true)
    private BigDecimal quantity;

    @NotNull(message = "体积不能为空")
    @ApiModelProperty(value = "单位体积", required = true)
    private BigDecimal volume;

    @NotNull(message = "重量不能为空")
    @ApiModelProperty(value = "单位重量", required = true)
    private BigDecimal weight;

    @ApiModelProperty(value = "商品ID", hidden = true)
    private Long goodsId;

    @ApiModelProperty(value = "批次号")
    private String batchNo;

    @ApiModelProperty(value = "商品备注")
    private String desc;

    @NotEmpty(message = "物品类型不能为空")
    @ApiModelProperty(value = "物品类型", required = true)
    private String typeName;

    @ApiModelProperty(value = "数量单位")
    private String unit;

    @ApiModelProperty(value = "发货方名称")
    private String customerName;

    @ApiModelProperty(value = "客户id", hidden = true)
    private Long customerId;
    @ApiModelProperty(value = "类型id", hidden = true)
    private Long goodsTypeId;
    @ApiModelProperty(value = "租户id", hidden = true)
    private Long tenantId;
    @ApiModelProperty(value = "用户id", hidden = true)
    private Long userId;
}
